<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <title>学生管理</title>
    <base href="<%=basePath%>">
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <link href="Style/Style.css" rel="stylesheet" type="text/css" />
</head>

 <script type="text/javascript">
    function showconfirmDialog(){
      if(${requestScope.source eq '信息' }){
      	confirm("${requestScope.Msg}")
      }
    }
</script>

<body onload="showconfirmDialog()">
<center>
  <table width="100%" border="0" cellspacing="0" cellpadding="0">
    <tr>
      <td height="60" bgcolor="#E6F5FF" style="color:#06F; font-size:19px; font-weight:bolder; padding-left:50px;">学生成绩管理系统</td>
    </tr>
    <tr>
      <td height="30" background="Images/MenuBg.jpg" align="center">欢迎使用本系统!</td>
    </tr>
    <tr>
      <td height="400" align="left" valign="top">
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td width="191" height="500" align="left" valign="top" background="Images/leftbg.jpg">
          <%@ include file="Left.jsp"%>
          </td>
          <td width="100%" align="left" valign="top" bgcolor="#F6F9FE" colspan="2">
          <table width="100%" border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td height="30" background="Images/mainMenuBg.jpg" style="padding-left:25px;">学生管理</td>
            </tr>
            <tr>
              <td height="470" align="center" valign="top" bgcolor="#F6F9FE">
              <form name="form1" method="post" action="Myser">
                <table width="100%%" border="0" cellspacing="0" cellpadding="0">
                  <tr>
                    <td width="28%" height="30" style="padding-left:20px;"> 功能导航： <input type="button" value="添加学生" onclick='window.location.href="Myser?status=toinsert";'></td>
                    <td width="72%">查询：
                      <select name="SearchRow" id="SearchRow">
                        <option value="姓名">姓名</option>
                        <option value="学号">学号</option>
                      </select>
                      <input name="Search" type="text" class="text1" id="Search">
                      <input name="status" type="hidden" value="search">
                      <input name="currentPage" type="hidden" value="1">
                      <input type="submit" name="button" id="button" value="点击查询"></td>
                  </tr>
                </table>
              </form>
                <table width="100%" border="0" cellspacing="0" cellpadding="0">
                  <tr align="center"  class="t1">
                    <td height="25" bgcolor="#D5E4F4"><strong>学号</strong></td>
                    <td bgcolor="#D5E4F4"><strong>姓名</strong></td>
                    <td bgcolor="#D5E4F4"><strong>JSP</strong></td>
                    <td bgcolor="#D5E4F4"><strong>XML</strong></td>
                    <td bgcolor="#D5E4F4"><strong>操作</strong></td>
                  </tr>
                  <c:forEach items="${requestScope.stus}" var="stud" varStatus="id">
                    <tr align="center">
                      <td height="25" align="center">${stud.id}</td>
                      <td>${stud.name}</td>
                      <td>${stud.JSP}</td>
                      <td align="center">${stud.XML}</td>
                      <td align="center"><a href="Myser?status=toupdate&id=${stud.id}"><font color="blue">修改</font></a> <a href="Myser?status=del&DelRow=学号&Del=${stud.id }&currentPage=${sessionScope.currentPage}" onClick="return confirm('确定要删除该信息吗？')"><font color="blue">删除</font></a></td>
                    </tr>
                  </c:forEach>
                </table>
                
                <c:choose>
				<c:when test="${sessionScope.currentPage==1}">
				</c:when>
				<c:otherwise>
				<a href="Myser?status=dis&currentPage=1">首页</a>&nbsp;&nbsp;
				<a href="Myser?status=dis&currentPage=${sessionScope.currentPage-1}">上一页</a>&nbsp;&nbsp;
				</c:otherwise>
				</c:choose>
				<c:choose>
				<c:when test="${sessionScope.currentPage==sessionScope.countPage}">
				</c:when>
				<c:otherwise>
				<a href="Myser?status=dis&currentPage=${sessionScope.countPage}">尾页 </a>&nbsp;&nbsp;
				<a href="Myser?status=dis&currentPage=${sessionScope.currentPage+1}">下一页 </a>&nbsp;&nbsp;
				</c:otherwise>
				</c:choose>
                
                </td>
            </tr>
          </table></td>
        </tr>
      </table></td>
    </tr>
    <td height="25" background="Images/bootBg.jpg" align="center">
		 	<p>© 长江师范学院||软件服务与外包1班||   徐瑜</p>
	</td>
  </table>

</center>
</body>
</html>
